﻿// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>Vecen.BangChuang</Solution>
// <Project>Vecen.BangChuang.Core</Project>
// <FileName>ValidationCode.cs</FileName>
// <CreateTime>2017-04-29 22:10</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-29 22:10" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Abp.Domain.Entities.Auditing;

namespace Vecen.BangChuang.BangChuang.Common {
    [Table("ValidationCodes")]
    public class ValidationCode: CreationAuditedEntity {
        [StringLength(32)]
        public string Target { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string TargetType { get; set; }

        [StringLength(32)]
        public string Code { get; set; }

        /// <summary>
        /// 验证类型
        /// </summary>
        [StringLength(32)]
        public string ValidateType { get; set; }

        /// <summary>
        /// 是否已经验证
        /// </summary>
        public bool IsValidated { get; set; }

        /// <summary>
        /// 是否已经失效
        /// </summary>
        public bool IsObsolete { get; set; }
    }

    public enum ValidationCodeTargetType {
        PhoneNumber,
        Email
    }
}